using System;
using System.IO;
using System.Drawing;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace IRL.WebControls
{

    #region PagingButtons enum
    public enum PagingButtons
    {        
        NextPrevious,
        NextPreviousFirstLast,        
        Numeric,
        NumericFirstLast
    }
    #endregion
    
    #region PaginationRepeater Control Class

    public class PaginationRepeater : Repeater
    {
        private bool _AllowPaging;        
        private int _PageSize;
        private int _PageButtonCount;
        private int _CurrentPageIndex;
        private PagingButtons _PagingButtons;

        #region CTOR(S)

        public PaginationRepeater(): base()
        {
            _AllowPaging = true;
            _PageSize = 10;
            _PageButtonCount = 10;
            _CurrentPageIndex = 0;
            _PagingButtons = PagingButtons.NextPreviousFirstLast;
        }

        #endregion

        #region Control Properties
        // PagingButtons
        public PagingButtons PagingButtons
        {
            get { return (PagingButtons)_PagingButtons; }
            set { _PagingButtons = value; }
        }
        // AllowPaging
        public bool AllowPaging
        {
            get
            {
                return _AllowPaging;
            }
            set
            {
                _AllowPaging = Convert.ToBoolean(value);
            }
        }
        // PageSize
        public int PageSize
        {
            get
            {
                return _PageSize;
            }
            set
            {
                _PageSize = Convert.ToInt32(value);
            }
        }
        // PageButtonCount
        public int PageButtonCount
        {
            get
            {
                return _PageButtonCount;
            }
            set
            {
                _PageButtonCount = Convert.ToInt32(value);
            }
        }
        // CurrentPageIndex
        public int CurrentPageIndex
        {
            get
            {
                return _CurrentPageIndex;
            }
            set
            {
                _CurrentPageIndex = Convert.ToInt32(value);
            }
        }

        #endregion
    }
    #endregion
}